﻿using System;
using System.Collections.Generic;
using System.Web.UI.WebControls;
using Ue.Infrastructure.DomainBase;
using Ue.Qcdz.Domain.Tags;
using Ue.Infrastructure.Web.UI;

namespace Ue.Qcdz.UI.Controls
{
    public class TagGridView : Ue.Infrastructure.Web.UI.SkinnedGridView
    {
        protected override void GridViewDataBind(object sender, EventArgs args)
        {
            IDataResult<Tag> dataResult = TagService.GetTags(this);

            Repeater repeater = sender as Repeater;
            repeater.DataSource = dataResult.DataObjects;
            repeater.DataBind();

            this.RecordCount = dataResult.RecordCount;
        }

        protected override string GetSkinFileName()
        {
            return "~/Admin/Themes/Skins/Tags/Tags.ascx";
        }
    }
}
